/**
 * Theme
 */
const path = require('path');

const {
  generateTheme,
  getLessVars
} = require('antd-theme-generator');
const options = {};
generateTheme({
    antDir: path.join(__dirname, './node_modules/ant-design-vue'), // node_modules中antd的路径
    stylesDir: path.join(__dirname, './src/styles/theme'), // styles对应的目录路径
    varFile: path.join(__dirname, './src/styles/theme/variables.less'), // less变量的入口文件
    // theme variables
    themeVariables: [
      '@primary-color',
      '@success-color',
      '@secondary-color',
      '@text-color',
      '@text-color-secondary',
      '@heading-color',
      '@layout-body-background',
      '@btn-primary-bg',
      '@layout-header-background',
      // 深夜模式
      '@layout-body-background',
      '@body-background',
      '@component-background',
      '@heading-color',
      '@text-color',
      '@text-color-inverse',
      '@text-color-secondary',
      '@shadow-color',
      '@border-color-split',
      '@background-color-light',
      '@background-color-base',
      '@table-selected-row-bg',
      '@table-expanded-row-bg',
      '@checkbox-check-color',
      '@disabled-color',
      '@menu-dark-color',
      '@menu-dark-highlight-color',
      '@menu-dark-arrow-color',
      '@btn-primary-color'
    ],
    outputFilePath: path.join(__dirname, './public/color.less'), //生成的color.less文件的位置
    customColorRegexArray: [/^color\(.*\)$/],
  })
  .then(res => {
    console.log('Load Theme Success!!');
  })
  .catch(res => {
    console.log('Load Theme Fail!!');
  });